package com.java.comprehensive.design.structural_model.facade_pattern;

public class SmartAppliancesFacade {

    private TV tv;
    public Light light;
    private AirCondition airCondition;

    public SmartAppliancesFacade() {
        this.tv = new TV();
        this.light = new Light();
        this.airCondition = new AirCondition();
    }

    public void say(String msg) {
        if ("打开".equals(msg)) {

        } else if ("关闭".equals(msg)) {

        } else {
            System.out.println("error msg");
        }
    }

    private void on() {
        tv.on();
        light.on();
        airCondition.on();
    }

    private void off() {
        tv.off();
        light.off();
        airCondition.off();
    }
}
